package internal

import (
	"server/base"
	"server/conf"
	"server/g"
	db1 "server/libs/db"

	"github.com/name5566/leaf/module"
)

var (
	skeleton = base.NewSkeleton()
	ChanRPC  = skeleton.ChanRPCServer
)

const ()

type Module struct {
	*module.Skeleton
}

func (m *Module) OnInit() {
	db1.InitMysql(conf.Server.Mysql)
	db1.InitRedis(conf.Server.RedisAddr, conf.Server.RedisPwd)
	m.Skeleton = skeleton
	g.DbRpc = ChanRPC
}

func (m *Module) OnDestroy() {

}
